#ifdef IMAM_LOG
#ifndef LOGSYS_FLAG
#define LOGSYS_FLAG
#endif
#endif

#include <project.h>
#define CITI_C

#include <sizes.h>
#include <aclconio.h>
#include <stdio.h>
#include <stdlib.h>
#include <svctxo.h>
#include <ctype.h>    
#include <acldev.h>
#include <aclstr.h>
#include <aclutil.h>
#include <prot8583.h>
#include <define.h>
#include <transact.h>
#include <dbmgr.h>
#include <mdlfuncs.h>
#include <svc.h>
#include <power.h> 
#include <message.h>

#include <entry.h>   
#include <pinpad.h>  
#include <protocol.h>
#include <packet.h>
#include <tran.h>
#include <comm.h>
#include <modem.h>
#include <ppt.h>
#include <piputl.h>
#include <pipmsg.h>
#include <isoutl.h>
#include <isoload.h>
#include <ifldtbl.h>
#include <msg.h>
#include <msgfuncs.h>
#include <bdt.h>
#include <hdt.h>
#include <trt.h>
#include <mht.h>
#include <iit.h>
#include <accum.h>
#include <form.h>
#include <date.h>
#include <mem.h>
#include <spdebug.h>
#include <funcids.h>
#include <pbatch.h>
#include <errno.h>
#include <ascii.h>
#include <amexhost.h>
#include <pct.h>
#include <formater.h>
#include <table.h>
#include <string.h>
#include <confio.h>
#include <aclfile.h>
#include <format.h>
#include <spamsg.h>
#include <oper.h>
#include <batmsg.h>
#include <ui.h>
#include <tct.h>
#include <multilng.h>
#include <logo.h>
#include <settlbat.h>
#include <msgclrk.h>
#include <msgshf.h>
#include <menufunc.h>
#include <mit.h>
#include <applidl.h>
#include <tblutil.h>
#include <menus.h>
#include <Validt.h>
#include <stats.h>
#include <cardmsg.h>
#include <card.h>
#include <msg.h>
#include <define.h>
#include <entry.h>
#include <pinpad.h>
#include <ctype.h>
#include <gds.h>
#include <power.h>
#include <tip.h>
#include <iso8583.h>
#include <beetle.h>
#include <xmodem.h>
#include <modemmsg.h>
#include <scdefine.h>
#include <rcptsegs.h>
#include <operate.h>
#include <cdt.h>///ivan
#include <battery.h>
#include <printer.h>
#include <rs232.h>
#include <ConfProto.h> //

#include "IMAMids.h"
#include "MiniAtm.h"
#include "UclCode.h"
#include "ImamUtil.h"
#include "ImamMenu.h"
#include "ImamPinpad.h"

#include "..\cpacsrc\cpacmsg.h"
#include "..\cpacsrc\cpacids.h"
#include "..\cpacsrc\cpacsrc.h"
#include "..\cpacsrc\cpac.h"
#include "..\cpacsrc\cpacsize.h"
#include "..\cpacsrc\cpacprnt.h"
#include "..\cpacsrc\cpacoper.h"

#include "..\CITIsrc\CITImsg.h"
#include "..\CITIsrc\CITIsrc.h"
#include "..\CITIsrc\CITIids.h"
#include "..\CITIsrc\CITIsize.h"

#include "..\EMVSrc\EMVsrcdef.h"

#define		EOT				0x04/*End of Transmission*/
#define		ENQ				0x05/*Enquiry*/
#define		ACK				0x06/*Acknowledgement*/
//#define		SUCCESS			0x00/*Success*/
#define		WRONGPIN		0x01/*Wrong PIN*/
#define 	WRONGPAN		0x02/*Wrong PAN*/
#define		PINTO			0x03/*PIN Comm Error----time out PIN verification*/
#define		WK				0x0A/*Working Key*/
#define		WKACK			0x0B/*Working key Acknowledgement*/
#define		CANCELKEY		0x0C/*Cancel Key pressed*/
#define		UnAuthCard		0x0D/*Unauthorised Card*/
#define		TOSWIPE			0x10/* Time out for Card Swipe*/
#define		TOPIN			0x11/*Time out in PIN entre*/
#define     TOCOMM			0x12/*Timeout waiting host/bds response*/ //add by liem

#define		KILL			0xFF
#define		KILLACK			0xF0
#define		BIN				0xEE
#define		BINACK			0xE0

#define		PINREQ			0x07/*Request for PIN*/
#define		PINSEND			0x08/*Send PIN*/
#define		PINRES			0x09/*Result of PIN verfication*/
#define		PINACK			0x0E/*PIN Acknowledgement*/

#define		PINCREATEREQ	0x12/*Request for pin create by FES*/
#define		PINCREATERES	0x13/*Result of PIN create*/

#define		PINCHANGEREQ	0x14/*Request for pin change by FES*/
#define		PINCHANGESEND   0x15/*Send track2, old PIN, new PIN*/
#define		PINCHANGERES	0x16/*Result of PIN change*/

#define		CARDCAPREQ		0x30/*Request for card capture*/
#define		CARDCAPSEND		0x31/*Send card no*/

#define		TINCHANGEREQ	0x40/*Request for tin change by FES*/
#define		TINCHANGESEND	0x41/*Send track2, PIN, TIN*/
#define		TINCHANGERES	0x42/*Result of TIN change*/

#define		TINREQ			0x50/*Request for TIN*/

extern int hComPort;
char szWorkingKey[20];
char chCommandSession;

int inImamPinpad(){return VS_SUCCESS;}


int inInitComPortForPinpad(){return VS_SUCCESS;}

int inEnableFrontEndPinpad(void){return VS_SUCCESS;}
int inImamDoPinpadRecvProcessSend(void) {return VS_SUCCESS;}
int inDoPinpadRecvProcessSend(void) {return VS_SUCCESS;}
int inSelectPinpadMasterKey(){return VS_SUCCESS;}
int inGetPinForPinpad(char *szEPin, char *label) {return VS_SUCCESS;}

int inGetCardForPinpad(char *szTrack2, char *szPAN){return VS_SUCCESS;}
int inCheckCardForPinpad(char *szPAN, char *szReqBuff){return VS_SUCCESS;}

void vdDisplayPinpadStatus(char *szCode){return ;}